import router from "./router";
router.beforeEach((to, from, next) => {
    // console.log(to);
    if (localStorage.getItem("token") || to.name == "login") {
        next();
    } else {
        next({
            path: "/login"
        })
    }
    next();
})